<script type="text/javascript"> 
 
    $(document).ready(function(){ 
		// initialise Superfish 
        $("ul.sf-menu").superfish({ 
            pathClass:  'Menus' 
        });
        $('#sortable').sortable(); 
    }); 
 
</script>
	Menus Items&nbsp;&nbsp;<a  href="<?=APP_ROOT;?>/menus/add">Add new</a><br />
	<br />
	<table cellpadding="2" cellspacing="3" class="list">
		<thead>
			<th class = "listID" >ID</th>
			<th>Name</th>
			<th class = "listAction">Action</th>
		</thead>
		<tbody  id="sortable" >
		<? 
			$i=0;			
			foreach ($menus as $menu){
				$i++;
				$id = $menu['Menu']['id'];
				$name = $menu['Menu']['name_eng'];
				$active = $menu['Menu']['active'];
		?>
		<tr class="<?php if($i%2) echo 'zuyg'; else echo 'kent';  ?>">
			<td class = "listID">
				<? echo $id; ?>
			</td>
			<td>
				<a href="<?=APP_ROOT;?>/menus/edit/<?=$id?>" ><? echo $name; ?></a></td>
			<td class = "listAction">
				<a title='display in site' href="<?=APP_ROOT;?>/menus/changeActive/<? echo $id; ?>"><img src="<?=APP_ROOT;?>/img/icons/<? if ($active) { ?>Colored<? } else { ?>Grey<? } ?>/GIF/action_check.gif" /></a>
				<a title="edit" href="<?=APP_ROOT;?>/menus/edit/<?=$id?>" ><img src="<?=APP_ROOT;?>/img/icons/Colored/GIF/reply.gif" /></a>
				<a title="delete" onclick="javascript:del(<? echo $id; ?>)" href="#" ><img src="<?=APP_ROOT;?>/img/icons/Colored/GIF/action_delete.gif" /></a>
				<? if ($i != count($menus)) { ?><a title='move down' href="<?=APP_ROOT;?>/menus/moveDown/<? echo $id; ?>"><img src="<?=APP_ROOT;?>/img/icons/Colored/GIF/arrow_down.gif" /></a><? } //if ?>
			</td>
		</tr>
		
		<?
		}//for main products
		?>
		</tbody>
	</table>
<script language="javascript" type="text/javascript">
function del(id){
	if (confirm("Are you sure?")) {
    	window.location.href = "<?=APP_ROOT;?>/menus/delete/"+id;
	}
}
</script>